load("@prelude//apple/tools:defs.bzl", "meta_python_test")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

python_library(
    name = "lib",
    srcs = [
        "macho.py",
        "macho_parser.py",
        "scrubber.py",
        "spec.py",
        "utils.py",
    ],
    deps = [
        "prelude//apple/tools/re_compatibility_utils:re_compatibility_utils",
    ],
)

python_binary(
    name = "tool",
    main = "main.py",
    visibility = ["PUBLIC"],
    deps = [
        ":lib",
    ],
)

meta_python_test(
    name = "tests",
    srcs = [
        "scrubber_test.py",
        "spec_test.py",
    ],
    resources = glob([
        "test_resources/*",
    ]),
    deps = [
        "fbsource//third-party/pypi/importlib-resources:importlib-resources",
        ":lib",
    ],
)
